HAL PWR voltage monitoring functions migration

This section provides information about the HAL PWR voltage monitoring functions migration .

HAL PWR enable/disable voltage monitoring PVM1

HAL1

HAL2

Function name

  • HAL_PWREx_EnablePVM1(void)

  • HAL_PWR_EnableVoltageMonitor(uint32_t monitor)

Function name

  • HAL_PWREx_DisablePVM1(void)

  • HAL_PWR_DisableVoltageMonitor(uint32_t monitor)


HAL PWR enable/disable voltage monitoring PVM2

HAL1

HAL2

Function name

  • HAL_PWREx_EnablePVM2(void)

  • HAL_PWR_EnableVoltageMonitor(uint32_t monitor)

Function name

  • HAL_PWREx_DisablePVM2(void)

  • HAL_PWR_DisableVoltageMonitor(uint32_t monitor)


HAL PWR enable/disable voltage monitoring PVM3

HAL1

HAL2

Function name

  • HAL_PWREx_EnablePVM3(void)

  • HAL_PWR_EnableVoltageMonitor(uint32_t monitor)

Function name

  • HAL_PWREx_DisablePVM3(void)

  • HAL_PWR_DisableVoltageMonitor(uint32_t monitor)


HAL PWR enable/disable voltage monitoring PVM4

HAL1

HAL2

Function name

  • HAL_PWREx_EnablePVM4(void)

  • HAL_PWR_EnableVoltageMonitor(uint32_t monitor)

Function name

  • HAL_PWREx_DisablePVM4(void)

  • HAL_PWR_DisableVoltageMonitor(uint32_t monitor)


HAL PWR enable/disable battery charging

HAL1

HAL2

Function name

  • HAL_PWREx_DisableBatteryCharging(void)

  • HAL_PWR_DisableBatteryCharging(void)

Function name

  • HAL_PWREx_EnableBatteryCharging(void)

  • HAL_PWR_EnableBatteryCharging(void)


HAL PWR enable/disable UCP Dead battery

HAL1

HAL2

Function name

  • HAL_PWREx_DisableUCPDDeadBattery(void)

  • HAL_PWR_LP_DisableUCPDDeadBattery(void)

Function name

  • HAL_PWREx_EnableUCPDDeadBattery(void)

  • HAL_PWR_LP_EnableUCPDDeadBattery(void)


HAL PWR enable/Disable AVD

HAL1

HAL2

Function name

  • HAL_PWREx_EnableAVD(void)

  • HAL_PWR_EnableAnalogVoltageDetector(void)

Function name

  • HAL_PWREx_DisableAVD(void)

  • HAL_PWR_DisableAnalogVoltageDetector(void)


HAL PWR enable/disable UCPD stand by mode

HAL1

HAL2

Function name

  • HAL_PWREx_EnableUCPDStandbyMode(void)

  • HAL_PWR_LP_EnableUCPDRetention(void)

Function name

  • HAL_PWREx_DisableUCPDStandbyMode(void)

  • HAL_PWR_LP_DisableUCPDRetention(void)


HAL PWR enable/disable Temperature Vdd monitoring

HAL1

HAL2

Function name

  • HAL_PWREx_DisableMonitoring(void)

  • HAL_PWR_DisableTemperatureVddMonitor(void)

Function name

  • HAL_PWREx_EnableMonitoring(void)

  • HAL_PWR_EnableTemperatureVddMonitor(void)


HAL PWR enable/disable vdd usb

HAL1

HAL2

Function name

  • HAL_PWREx_DisableVddUSB(void)

  • HAL_PWR_DisableIndependentVddUSBSupply(void)

Function name

  • HAL_PWREx_EnableVddUSB(void)

  • HAL_PWR_EnableIndependentVddUSBSupply(void)


HAL PWR enable/disable PVM USB

HAL1

HAL2

Function name

  • HAL_PWREx_DisablePVMUSB(void)

  • HAL_PWR_DisableVoltageMonitor(void)

Function name

  • HAL_PWREx_EnablePVMUSB(void)

  • HAL_PWR_EnableVoltageMonitor(void)


HAL PWR enable/disable PVD

HAL1

HAL2

Function name

  • HAL_PWREx_DisablePVD(void)

  • HAL_PWR_DisableProgrammableVoltageDetector(void)

Function name

  • HAL_PWREx_EnablePVD(void)

  • HAL_PWR_EnableProgrammableVoltageDetector(void)


HAL PWR enable/Disable VDD11 USB

HAL1

HAL2

Function name

  • HAL_PWREx_DisableVDD11USB(void)

  • HAL_PWR_DisableUSBIndependentSupply(void)

Function name

  • HAL_PWREx_EnableVDD11USB(void)

  • HAL_PWR_EnableUSBIndependentSupply(void)


HAL PWR enable/disable OTGHSPHY LowPower Retention

HAL1

HAL2

Function name

  • HAL_PWREx_DisableOTGHSPHYLowPowerRetention(void)

  • HAL_PWR_LP_DisableOTGHSPHYRetention(void)

Function name

  • HAL_PWREx_EnableOTGHSPHYLowPowerRetention(void)

  • HAL_PWR_LP_EnableOTGHSPHYRetention(void)


HAL PWR enable/disable PVD

HAL1

HAL2

Function name

  • HAL_PWR_EnablePVD(void)

  • HAL_PWR_EnableProgrammableVoltageDetector(void)

Function name

  • HAL_PWR_DisablePVD(void)

  • HAL_PWR_DisableProgrammableVoltageDetector(void)


HAL PWR enable/disable USBHS transceiver supply

HAL1

HAL2

Function name

  • HAL_PWREx_DisableUSBHSTranceiverSupply(void)

  • HAL_PWR_DisableVddUSBHSTransceiverSupply(void)

Function name

  • HAL_PWREx_EnableUSBHSTranceiverSupply(void)

  • HAL_PWR_EnableVddUSBHSTransceiverSupply(void)


HAL PWR enable/disable AVM2

HAL1

HAL2

Function name

  • HAL_PWREx_DisableAVM2(void)

  • HAL_PWR_DisableVddAMonitor2(void)

Function name

  • HAL_PWREx_EnableAVM2(void)

  • HAL_PWR_EnableVddAMonitor2(void)


HAL PWR enable/disable AVM1

HAL1

HAL2

Function name

  • HAL_PWREx_DisableAVM1(void)

  • HAL_PWR_DisableVddAMonitor1(void)

Function name

  • HAL_PWREx_EnableAVM1(void)

  • HAL_PWR_EnableVddAMonitor1(void)


HAL PWR enable/disable O2VM

HAL1

HAL2

Function name

  • HAL_PWREx_DisableO2VM()

  • HAL_PWR_DisableVddIO2IndependentSupply()

Function name

  • HAL_PWREx_EnableO2VM()

  • HAL_PWR_EnableVddIO2IndependentSupply()


HAL PWR enable/disable UVM

HAL1

HAL2

Function name

  • HAL_PWREx_DisableUVM(void)

  • HAL_PWR_DisableVddUSBIndependentSupply(void)

Function name

  • HAL_PWREx_EnableUVM(void)

  • HAL_PWR_EnableVddUSBIndependentSupply(void)


HAL PWR enable/disable VddA

HAL1

HAL2

Function name

  • HAL_PWREx_DisableVddA(void)

  • HAL_PWR_DisableVddAIndependentSupply(void)

Function name

  • HAL_PWREx_EnableVddA(void)

  • HAL_PWR_EnableVddAIndependentSupply(uint32_t monitor)


HAL PWR enable/disable VddIO2

HAL1

HAL2

Function name

  • HAL_PWREx_DisableVddIO2(void)

  • HAL_PWR_DisableVddIO2IndependentSupply(void)

Function name

  • HAL_PWREx_EnableVddIO2(void)

  • HAL_PWR_EnableVddIO2IndependentSupply(void)


HAL PWR Configure PVD

HAL1

HAL2

Function name

  • HAL_PWR_ConfigPVD(PWR_PVDTypeDef *sConfigPVD) OR HAL_PWREx_ConfigPVD

  • in HAL2, use the following sequence to configure PVD

/* Set PLS[7:5] bits according to PVDLevel value */
HAL_PWR_SetProgrammableVoltageDetectorLevel(level)

HAL PWR Configure PVM

HAL1

HAL2

Function name

  • HAL_PWR_ConfigPVM()

  • In HAL2, the PVM configuration is managed using the EXTI driver. For EXTI management, use the HAL EXTI instead to initialize, configure, and enable the corresponding EXTI line.

    Related use case Power Voltage Detector (PVD) with EXTI wakeup.


HAL PWR Configure AVD

HAL1

HAL2

Function name

  • HAL_PWREx_ConfigAVD(const PWREx_AVDTypeDef *sConfigAVD)

  • In HAL2, the AVD configuration is managed using the EXTI driver. For EXTI management, use the HAL EXTI instead to initialize, configure, and enable the corresponding EXTI line.

    Related use case Power Voltage Detector (PVD) with EXTI wakeup.